﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.IO;

namespace Subsidiary.BookSearch
{
    class Crawler
    {
        public string Grab(string url)
        {
            WebRequest request = HttpWebRequest.Create(url);
            HttpWebResponse response = request.GetResponse() as HttpWebResponse;
            Stream s  = response.GetResponseStream();
            StreamReader sr = new StreamReader(s);
            string html = sr.ReadToEnd();
            sr.Close();
            s.Close();
            return html;
        }
    }
}
